home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 4
/
004.d81
/
dos part 8
< prev
next >
Wrap
Text File
|
2022-08-26
|
3KB
|
174 lines
DOS & DON'TS - PART 8
---------------------
Now that you know what wild cards
are, how do you use them? The fol-
lowing paragraphs will show how vari-
ous commands work with wild cards:
LOAD, VERIFY, and OPEN in any of
their forms will select the first file
that matches their filename. EXCEP-
TION: If the filename is '*', these
commands will use the LAST FILE THAT
THE DISK ACCESSED! If none was previ-
ously accessed (like if you just turn-
ed the disk drive or the 64 on), then
the first file on the disk is used
like you would normally expect. If
you want to be SURE and get the first
file, use ':*' instead of '*'!
The Directory command can take a
filename following the '$' and a ':'.
The listing will include ONLY the
matching files. For example:
@$:FILE ?
0 "MY OWN DISK " MD 2A
3 "FILE 1" SEQ
6 "FILE 2" SEQ
5 "FILE 5" SEQ
601 BLOCKS FREE.
The Directory command also takes a
special wildcard: '=' followed by a
'P', 'S', 'U' or 'R' will cause only
PRG, SEQ, USR or REL files respective-
ly to be listed. For example:
@$:F*=P
0 "MY OWN DISK " MD 2A
45 "FILE MAKER" PRG
9 "FIRE 1" PRG
12 "FILLER" PRG
601 BLOCKS FREE.
The SCRATCH command scratches (de-
letes, or removes) ALL matching files.
That means that the DOS Wedge command
'@S:*' will erase ALL files from the
disk! If that is what you want to do,
it is MUCH faster to use the NEW com-
mand without an ID to erase all files.
For example: '@N:MY OWN DISK'. After
using the SCRATCH command, the Disk
Status command will return an Error
Type 01, message 'FILES SCRATCHED'.
The Track number (the third part of
the Status message) will be the number
of files scratched. For example:
@S:FILE ?
@
01, FILES SCRATCHED,03,00
The RENAME command does NOT use the
wild card characters.
The COPY command can accept wild
cards on both sides of the '='. The
filename on the left (the destination)
MUST be '*' if wild cards are used in
the filename on the right. This is
useful only with dual-drive units like
the CBM 4040 (with an IEEE interface)
or an MSD SuperDrive 2. It causes all
the files that match the source file-
name to be copied with their names in-
tact. For example:
@C1:*=0:??????
with a dual-drive unit would cause all
the files except 'FILE MAKER' on our
sample disk to be copied to the disk
in drive 1, keeping their names on the
new disk.
Using the '*' quirk of the LOAD
command can be handy. If you have a
program in memory that you just LOADed
from disk, and you SCRATCH it from the
disk and NEW it from memory, then de-
cide you want it back, you can IMMED-
IATELY type 'LOAD "*",8' ('/*' with
the Wedge), and the file will LOAD
back in, even though it was SCRATCHed!
You can then SAVE it as usual!
------------ end of article ----------